class User < ActiveRecord::Base

  validates_presence_of(:name)
  validates_presence_of(:login)
  validates_presence_of(:password)
  validates_uniqueness_of(:login)
  validates_length_of(:login, :minimum => 3)
  validates_length_of(:login, :maximum => 20)
  validates_length_of :password, :within => 3..20
  validates_length_of :name, :within => 3..60

  has_many :enrollments
end
